package com.bingfabao.semephore;

import com.bingfabao.cecb.MyCycRun;

import java.util.concurrent.Semaphore;

/**
 * @author: LCG
 * 作者: LCG
 * 日期: 2021/2/25  13:58
 * 描述:
 */
public class TestSemephore {

    public static void main(String[] args) {

        Semaphore semaphore=new Semaphore(1);


        for (int i=0;i<5;i++){
            Thread thread=new Thread(new MySemeRun(semaphore),"A-"+i);
            thread.start();
        }




    }

}
